home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19970626-19970929 / 000090_news@newsmaster….columbia.edu _Tue Jul 22 14:14:02 1997.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id OAA21568
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Tue, 22 Jul 1997 14:14:02 -0400 (EDT)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id OAA11790
  7.     for kermit.misc@watsun; Tue, 22 Jul 1997 14:14:02 -0400 (EDT)
  8. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: arithmetics in scripts
  12. Date: 22 Jul 1997 18:13:58 GMT
  13. Organization: Columbia University
  14. Lines: 27
  15. Message-ID: <5r2t96$keq$1@apakabar.cc.columbia.edu>
  16. References: <5r22t1$6p4@glas.apc.org>
  17. NNTP-Posting-Host: watsun.cc.columbia.edu
  18. Xref: news.columbia.edu comp.protocols.kermit.misc:7368
  19.  
  20. In article <5r22t1$6p4@glas.apc.org>,
  21. Dmitry the Zuryanovich <dz@mir.glas.apc.org> wrote:
  22. : I do not understand rules of arithmetic operations in CKermit: looks
  23. : like they do not operate with anything larger then bytes.
  24. :
  25. It depends on the underlying platform (and more to the point, sizeof int).
  26.  
  27. : I want to count crc16 and then convert it to hex ( as 16 bit integer ),
  28. : but it converts numbers like 123 to 313233 ( where 31h is ascii of '1' and
  29. : so on).
  30. :
  31. How are you trying to do this?
  32.  
  33. In C-Kermit 6.0 the operation you want to do trivial.  Suppose \%s is
  34. the string.  Then to get the hexadecimal CRC-16:
  35.  
  36.   \fhex(\fcrc16(\%s))
  37.  
  38. If you don't have C-Kermit 6.0, find it at:
  39.  
  40.   http://www.columbia.edu/kermit/ck60.html
  41.  
  42. To learn its script programming language, please read the manual:
  43.  
  44.   http://www.columbia.edu/kermit/ck60manual.html
  45.  
  46. - Frank